package com.lijin.service.impl;

import com.lijin.dao.UserDao;
import com.lijin.entity.User;
import com.lijin.service.UserService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by gold-jx on 2017/5/31.
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserDao userDao;


    @Override
    public int insertUser(User user) {
        return userDao.insertUser(user);
    }

    @Override
    public void addUser(User user) {
        userDao.addUser(user);
    }

    @Override
    public void deleteUserByName(String name) {
        userDao.deleteUserByName(name);
    }

    @Override
    public void updateUserByName(User user) {
        userDao.updateUserByName(user);
    }

    @Override
    public User findUserByName(String name) {
        return userDao.findUserByName(name);
    }

    @Override
    public List<User> findUserAll() {
        return userDao.findUserAll();
    }
}
